//
//  LoginProtocol.swift
//  imprint
//
//  Created by 小柠檬🍋 on 2025/1/10.
//

import Foundation
import SwiftUI

protocol LoginProtocol {
    //执行登陆
    func doLogin()
    //绑定
    func bind()
    
    //授权成功 code类型 
    func doAuthSuc(code: String)
    
    //授权成功 token类型
    func doAuthSuc(access_token: String, openid: String)
    
    //获取授权信息, key,id,user
    func getAuthInfo(code: String) async throws -> (String,String,UserBean)
    
    
    //获取授权信息, key,id,user
    func getAuthInfo(access_token: String, openid: String) async throws -> (String,String,UserBean)
    
    //执行登陆账号
    func doLoginAccount(type:String,id:String,newUserBean:UserBean)
}
